package com.liushuai.phoneguardian.utils;

import java.io.File;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class InstallApk {

	public static void installApk(Context context,File file)
	{
		Intent intent = new Intent();
		intent.setAction("android.intent.action.VIEW");
		intent.addCategory("android.intent.category.DEFAULT");
		intent.setType("application/vnd.android.package-archive");
		intent.setData(Uri.fromFile(file));
		intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
		context.startActivity(intent);
	}
}
